package com.cq;

import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("test")
public class TestController {

	
	@RequestMapping("add")
	public String list(HttpServletRequest request, HttpServletResponse response) {
		Map<String, String[]> param = request.getParameterMap();
		Enumeration<String> item = request.getParameterNames();
		while(item.hasMoreElements()) {
			System.out.println(item.nextElement());
		}
		
//		"columns";
		for (String key : param.keySet()) {
			System.out.println(key + ", " + param.get(key)[0] +"-" + param.get(key).length);
		}
		return null;
	}

}
